#include <stdio.h>

int main() {
    printf("Man   Women   Children\n");
    

    for (int men = 0; men <= 10; men++) {

        for (int women = 0; women <= 20; women++) {

            int children = 30 - men - women;
            

            if (children >= 0 && 
                (men * 3 + women * 2 + children == 50)) {
                printf("%2d    %2d     %2d\n", men, women, children);
            }
        }
    }
    
    return 0;
} 